import { Schema, ObjectId, db } from './mongo'

const MajorSchema = new Schema({
  name: { type: String, remark: '专业名字' },
  code: { type: Number, remark: '专业代码' },
  parent: { type: String, remark: '父级专业' },
  desc: { type: String, remark: '专业描述' },
  adapt: { type: [ObjectId], ref: 'book', remark: '使用教材' },
}, {
  collection: 'major',
  timestamps: true,
})

export default db.model('major', MajorSchema)
